package com.lzl.web3browser;

import static com.alphawallet.ethereum.EthereumNetworkBase.MAINNET_ID;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import androidx.annotation.Nullable;

import com.bumptech.glide.request.Request;
import com.lzl.web3browser.repository.TokenRepository;
import com.lzl.web3browser.util.AWEnsResolver;
import com.lzl.web3browser.widget.UserAvatar;

import io.reactivex.disposables.Disposable;

/**
 * @Description:
 * @Author: lzl
 * @CreateDate: 2022/8/25 15:42
 */
public class TestView extends LinearLayout {

    private final AWEnsResolver ensResolver;
    private Disposable loadAvatarDisposable;
    private Request iconRequest;
    private String walletAddress;

    private final ImageView image;
    private final RelativeLayout webLayout;
    private final WebView webView;


    public TestView(Context context) {
        this(context,null);
    }

    public TestView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        inflate(context, R.layout.item_asset_image, this);
        image = findViewById(R.id.image_asset);
        webLayout = findViewById(R.id.web_view_wrapper);
        webView = findViewById(R.id.image_web_view);
        findViewById(R.id.overlay).setVisibility(View.VISIBLE);
//
        ensResolver = new AWEnsResolver(TokenRepository.getWeb3jService(MAINNET_ID), context);

    }
}
